home *** CD-ROM | disk | FTP | other *** search
- % -----------------------------------------------------------------------------
- % Demonstration of decision structures *TERMINATE PRESCRIPTION*
- % -----------------------------------------------------------------------------
- %
- % Version : 1.00
- % Filename : IF-TEST.TSL
- % Company : BLOKKER+BLOKKER Software
- % Programmer : Joop Blokker
- % Module created : 09-Aug-95
- % Latest revision : 09-Aug-95
- % Language/version : Terminate Prescription 1.00
- % Remarks : Multi IF - ELSE - ENDIF sieve structure
- %
- % -----------------------------------------------------------------------------
- %
- ClearScreen
- Set A = 3 % initialize A
- println "A = ", A % show A
- println ""
- println "Result must be : Three" % predict result
- println ""
- print "...the result is : "
- if A=0 % is it 0 ?
- println "Nought"
- else
- if A=1 % is it 1 ?
- println "One"
- else
- if A=2 % is it 2 ?
- println "Two"
- else
- if A=3 % is it 3 ?
- println "Three" % Bingo!
- endif
- endif
- endif
- endif
- println ""
- print "Press Enter, please..." % wait
- WaitEnter
- ClearScreen % clean up
- TERMINATE
-